<!DOCTYPE html>
<html lang="en">
<head>
	<include data="../head.html">
	<title>清理数据库</title>
	<style>
	button{margin: 20px 10px !important;}
	#onekey-clear{display: none;}
	#trash-list-div{display: none;}
	</style>
</head>
<body data-menu="settings">
	<div class="container">
		<ul class="nav nav-tabs" role="tablist">
			<li role="presentation" class="active">
				<a href="javascript:;">清理数据库</a>
			</li>
		</ul>
		<div id="trash-list-div" class="table-responsive">
			<table class="table table-striped table-hover">
				<thead>
					<tr>
						<th>模块</th>
						<th>无效记录</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody></tbody>
			</table>
		</div>
		<button id="start-test" data-loading-text="检测中..." class="btn btn-primary">开始检测</button>
		<button id="onekey-clear" data-loading-text="清理中..." class="btn btn-primary">一键清理</button>
	</div>
	<script>
	<?php 
		$tables = array();
		foreach(array_keys(database()) as $table){
			$tables[$table] = lang($table.'.label') ?: $table;
		}
		echo "var Tables = JSON.parse('".json_encode($tables)."');\n";
	?>
	</script>
	<include data="../foot.html">
</body>
</html>